<template>
  <body>
    <div class="login_bg" id="registerContent">
      <div class="n_login_bg">
        <div class="n_l_zz"></div>
          <img src="https://m.9bianli.com/Images/newphoto/login_bg3.png" class="login_bg2" />
        <div class="n_l_top">
          <router-link to="/user">
            <i class="re_coin" id="re_coin"></i>
          </router-link>
          <span class="use_pass">
              <router-link to="/login" style="color:white">密码登录</router-link>
              <i class="login_mima"></i>
          </span>
          <span class="use_code">短信验证码登录<i class="login_mima"></i></span>
        </div>
        <div class="n_l_tit">
          <div class="n_l_m"><a>登录</a><span>|</span><a>注册</a></div>
          <i class="login_coin"></i>
        </div>
      </div>
      <div class="n_login_box">
        <div class="login_border n_login">
          <input
            v-model="username"
            name="tbUserName"
            type="number"
            maxlength="11"
            id="tbUserName"
            class="login_input"
            placeholder="请输入手机号码"
            onkeypress="if (event.keyCode<48 || event.keyCode>57) event.returnValue=false;"
          />
          <i class="input_close" style="display: none"></i>
          <div class="clear"></div>
        </div>
        <div class="pwd_content" >
          <div class="pwd_swift n_login">
            <input
              name="tbPwd"
              type="password"
              id="tbPwd"
              class="login_input"
              placeholder="请输入注册密码"
              v-model="password"
            />
            <i class="input_close" ></i>
          </div>
          <div class="clear_phone">
            <span class="pwd_pic pwd_hide" id="pwd_pic"></span>
          </div>
          <div class="clear"></div>
        </div>
      </div>
      <div class="login_tips">
        <div class="lt_left">
          <i id="login_check_btn" class="ea_check"></i>
        </div>
        <div class="le_right">
          <span class="tips_show tips_yzm"
            >未注册酒便利的手机号，登录时将自动注册且代同意<a
              onclick="login_agreement('service')"
              >《用户服务协议》</a
            >、<a style="margin-left: 0" onclick="login_agreement('private')"
              >《隐私权政策》</a
            >，登录问题请拨打<a onclick="login_agreement('tel')"
              >01050951700</a
            ></span
          >
          <span class="tips_show tips_mima" style="display: none"
            >登录即代表您已同意<a onclick="login_agreement('service')"
              >《用户服务协议》</a
            >、<a style="margin-left: 0" onclick="login_agreement('private')"
              >《隐私权政策》</a
            >，登录问题请拨打<a onclick="login_agreement('tel')"
              >01050951700</a
            ></span
          >
        </div>
      </div>
      <div class="login_button">
        <input
        @click="regIn"
          id="btnlogin"
          class="login_button_img"
          type="button"
          value="注册"
          style="letter-spacing: 4px"
        />
      </div>

      <div class="forget_mima">
        <a href="javascript:forget(); " style="text-decoration: none"
          >忘记密码？</a
        >
      </div>

      <input type="hidden" id="hdValidKey" />

      <div class="other_login">
        <div class="login_tishi3">其他登录方式</div>
        <div class="other_login_wx">
          <img src="https://m.9bianli.com/Images/wx_login.png" id="wxLogin" />
        </div>
      </div>
    </div>
  </body>
</template>

<script>
import {userReg} from '../api/user'
export default {
  data(){
    return{
      username:'',
      password:''
    }
  },
  methods: {
    regIn() {
        let {username,password}=this
        let userIfo ={
          username,
          password
        }
        userReg(userIfo).then(res=>{
            if(res.data.code===111)
            this.$router.push('/login')
        })
    }
  },
};
</script>

<style lang="cass" scoped
src="../assets/css/login.css"></style>
<style lang="sass" scoped>
</style>